package com.nbers.springcloud.oauth2center.entity;

import org.springframework.security.core.GrantedAuthority;

/**
 * @author SIMON
 */
public class Role implements GrantedAuthority {
    private Long id;

    private String name;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getAuthority() {
        return name;
    }

    @Override
    public String toString() {
        return "Role{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
